﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Configuration;

namespace AnaGiftedProject
{
    public partial class WebForm11 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void Button1_Click1(object sender, EventArgs e)
        {
            /*   
              using (DatabaseGiftedEntities ctx = new DatabaseGiftedEntities())
              {
                  string imagefolder = "galleryimg";
                   string savepath;
                   string savefile;
                  string path = Server.MapPath(".") + "\\galleryimg\\" + FileUpload1.FileName;
                  FileUpload1.SaveAs(path);
                  GalleryImg gallimg = new GalleryImg();
                  if (FileUpload1.PostedFile != null)
                   {
                       //savepath = Path.Combine(Request.PhysicalApplicationPath, imagefolder);
                      // savefile = Path.Combine(savepath, FileUpload1.FileName);
                       gallimg.UserId = 2;
                       gallimg.StoreId = 1;
                       gallimg.GalleryImgName = txtName.Text;
                       gallimg.GalleryImgDescription = txtDes.Text;
                       gallimg.GalleryImgTrack = path;
                     //  Response.Redirect(Request.Url.AbsoluteUri);
                   }
                  ctx.AddToGalleryImgs(gallimg);
                  ctx.SaveChanges();
                  DataList1.DataBind();
                
              }*/
        }

    }
}